package test;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Hanzidu {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        String[] shu = {" ", "一", "二", "三", "四", "五", "六", "七", "八", "九"};
        String[] zi = {"", "十", "百", "千", "万", "十", "百", "千", "亿", "十", "百", "千", "万亿"};
        String n1 = String.valueOf(in.nextInt());
        StringBuilder nn = new StringBuilder();
        for (int i = 0; i < n1.toCharArray().length; i++) {
            int m = n1.toCharArray()[i]-48;
            nn.append(shu[m]);
            String d=zi[n1.length() - i - 1];
            nn.append(d);
        }
        String n2 = nn.toString();
        char c1 []= new char[n2.toCharArray().length];
        for (int i = 0; i < c1.length; i++) {
            c1[i] = n2.toCharArray()[i];
        }
        int mm = 0;
        for (int i = 0;i < c1.length; i++) {
            if (c1[i]==' '){
                c1[i]='\0';
                mm++;
            }
            if (c1[i]!='\0'){
                if (mm>=1){
                    c1[i-1]='零';
                    mm = 0;
                }
            }
        }
        System.out.println(c1);
    }
}
